<#include "common_var.include"/> 
<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp" %>
   	<form action="${classNameLower}Action!save.action" id="editFormId" method="post">
		<input type="hidden"  name="recordId" value="<@jspEl "recordId"/>" />
		<input type="hidden"  name="func" value="<@jspEl "func"/>" />
		<input type="hidden"  name="entity.${tableClazz.pkProp.name}" value="<@jspEl "entity.${tableClazz.pkProp.name}"/>" />
		<#list tableClazz.columns as prop>
    	<#if prop.name = "versionNo">
		<input type="hidden"  name="entity.versionNo" value="<@jspEl "entity.versionNo"/>" />
		</#if>
		</#list>
		<fieldset>
		<legend>主信息</legend>
		<#assign porpNo = 0>
		<table class="formTable">
		<#list tableClazz.getEditCols() as prop>
	<#-- 过滤掉不用的字段 -->
	<#if (!prop.propName?ends_with("remark")) && prop.propName != "versionNo" && prop.propName != "class" 
		&& prop.propName != "updateUser" && prop.propName != "updateTime" && prop.propName != "createTime" && prop.propName != "createUser"
		&&prop.editor.editTypeCode!='textarea'>
	<#assign porpNo=porpNo+1><#if (porpNo==1 || (porpNo-1) % 3 ==0)><tr></#if>
	<#if prop.editor.editTypeCode=='date'||prop.editor.editTypeCode=='datetime'>	    	  
	  	<td class="labelStyle"><label>${prop.propCnName}<#if prop.isEditRequired()><span>*</span></#if></label></td>
	    <td>
	    	<input id="eId${prop.propName?cap_first}" name="entity.${prop.propName}" type="text" style="width:120px;" class="Wdate ${prop.ruleHtml}" 
	    		onclick="WdatePicker({dateFmt:'yyyy-MM-dd<#if prop.editor.editTypeCode=="datetime"> HH:mm</#if>'})">
	    		<fmt:formatDate value="<@jspEl 'entity.${prop.propName}'/>" pattern ="yyyy-MM-dd<#if prop.editor.editTypeCode=="datetime"> HH:mm</#if>"/>
	    	</input>
	    </td>
	<#elseif prop.editor.editTypeCode=='dialog'>
	   	<td class="labelStyle"><label>${prop.propCnName}<#if prop.isEditRequired()><span>*</span></#if></label></td>
	    <td>
	    	<input id='eId${prop.idLabel?cap_first}Name' name="entity.${prop.idLabel?cap_first}Name" value="<@jspEl 'entity.${prop.idLabel?cap_first}Name'/>"  class="${prop.ruleHtml} inputStyle" type="text" />	
	   		<a class="selectedIco" href="#" onclick="open${prop.idLabel?cap_first}Dialog('eId${prop.propName?cap_first}','eId${prop.idLabel?cap_first}Name');"></a>
	    	<input id='eId${prop.propName?cap_first}' name="entity.${prop.propName}" value="<@jspEl 'entity.${prop.propName}'/>" type="hidden"/>	
	   	</td>
	<#elseif prop.editor.editTypeCode=='select'>
		<td class="labelStyle"><label>${prop.propCnName}<#if prop.isEditRequired()><span>*</span></#if></label></td>
		<td>
			<s:select id='eId${prop.propName?cap_first}' name="entity.${prop.propName}" list="${prop.idLabel}Map" cssClass="inputStyle ${prop.ruleHtml}" cssStyle="width:122px"<#if prop.isEditRequired()> headerKey="" headerValue=""</#if>></s:select>
		</td>
	<#else>
	   	<td class="labelStyle"><label>${prop.propCnName}<#if prop.isEditRequired()><span>*</span></#if></label></td>
	    <td>
	    	<input id='eId${prop.propName?cap_first}' name="entity.${prop.propName}" value="<@jspEl 'entity.${prop.propName}'/>" class="${prop.ruleHtml} inputStyle" type="text" />
	    </td>
	</#if>
	<#if (porpNo!=1 && porpNo % 3 ==0)></tr></#if>
	</#if>
	<#if (porpNo%3 !=0 && !prop_has_next)></tr></#if> 
	</#list>
	   
	
		<#--备注单独一行显示 -->
		<#list tableClazz.getEditCols() as prop>
    	<#if prop.editor.editTypeCode=='textarea'>
		<tr>
		<td class="labelStyle"><label>${prop.cnName}</label><#if prop.isEditRequired()><span>*</span></#if></td>
		<td style="width:320px;" colspan="5">
	   		<textarea id="eId${prop.name?cap_first}" cols="72" rows="3" class="${prop.ruleHtml}" name="entity.${prop.name}">
	   			<@jspEl "entity.${prop.name}"/>
	   		</textarea>
		</td>
		</tr>
		</#if>
		</#list>
		</table>
		</fieldset>
	</form>